<?php
/*********************/
/*                   */
/*  前台文章控制     */
/*   BY voiet        */
/*   2009-7-30       */
/*                   */
/*********************/

class cct_article extends ctl_article
{

	function index( $articleid )
	{
		$objArticle = $this->system->loadmodel( "content/article" );
		$this->pagedata['article'] = $objArticle->get( $articleid );
		$this->id = array(
			"node_id" => $articleid
		);
		$this->pagedata['node_name'] = $objArticle->getcatname( $this->pagedata['article']['node_id'] );
		
		if ( !$this->pagedata['article'] )
		{
			$this->system->error( 404 );
			exit( );
		}
		if ( $objArticle->isallow( $this->pagedata['article']['limit_level'], $GLOBALS['runtime']['member_lv'] ) )
		{
				$this->pagedata['article']['allow'] = 1;
		}
		else
		{
			$this->pagedata['article']['allow'] = 0;
		}
		$this->path = array( "title" => "" );
		$this->title = $this->pagedata['article']['title'];
		$this->output( );
	}
	

}

?>